﻿using Architecture.CrossCutting.Common.Logging;
using Architecture.CrossCutting.Web.Tracing.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Architecture.CrossCutting.LoggingEntities.Logger
{
    public class WebApiLogger : IGenericLogger<WebApiLog>
    {

        LoggingServiceContext _loggingService = new LoggingServiceContext();

        public void WriteError(string message, WebApiLog data, Exception ex)
        {
            throw new NotImplementedException();
        }

        public void WriteInfo(string message, WebApiLog data)
        {
            _loggingService.WebApiLogs.Add(data);
            Int32 count = _loggingService.SaveChanges();
        }
    }
}
